package com.joelaws.prototype.client;

import com.google.gwt.core.client.EntryPoint;
import com.gwtext.client.core.RegionPosition;
import com.gwtext.client.widgets.HTMLPanel;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.Viewport;
import com.gwtext.client.widgets.layout.BorderLayout;
import com.gwtext.client.widgets.layout.BorderLayoutData;
import com.gwtext.client.widgets.layout.FitLayout;

public class Home implements EntryPoint {

	public void onModuleLoad() {
		Panel borderPanel = new Panel();
		borderPanel.setLayout(new BorderLayout());

		TopPanel topPanel = new TopPanel();
		borderPanel.add(topPanel, new BorderLayoutData(RegionPosition.NORTH));

		Panel centerPanel = new Panel();
		centerPanel.setBorder(false);
		centerPanel.setLayout(new FitLayout());
		borderPanel.add(centerPanel, new BorderLayoutData(RegionPosition.CENTER));

		Panel southPanel = new HTMLPanel(
				"<center>About Us | Contact Us | Careers | Advertise | FAQ | Terms of Use | Privacy Policy</center>");
		southPanel.setHeight(30);
		southPanel.setTitle("");
		borderPanel.add(southPanel, new BorderLayoutData(RegionPosition.SOUTH));

		Panel mainPanel = new Panel();
		mainPanel.setBorder(false);
		mainPanel.setLayout(new FitLayout());
		mainPanel.add(borderPanel);

		new Viewport(mainPanel);

		ScreenManager screenManager = ScreenManager.init(topPanel, centerPanel);
		screenManager.setLoggedOut();
	}

}
